const ls = localStorage
export function getlsItem(key) {
    try {
        return JSON.parse(ls.getItem(key))
    } catch (err) {
        return null
    }
}
export function setlsItem(key, val) {
    ls.setItem(key, JSON.stringify(val))
}
// 全部清除
export function clearls() {
    ls.clear()
}
export function keysls() {
    return ls.keys()
}
export function removelsItem(key) {
    ls.removeItem(key)
}